Skip to content

Conversation

@sandworm88
Copy link

This is 'watchface' script with preview by 'yad' utility

@moWerk moWerk requested a review from beroset November 10, 2025 18:57
Copy link
Member

@beroset beroset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a lot of duplicated code here. Refactoring into functions would make it a lot easier to understand and maintain.


function restartCeres {
runWatchCommand "root" "systemctl restart user@1000"
runWatchCommand "ceres" "killall asteroid-launcher"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although it has a similar effect, this does not restart ceres.

local watchface
local action
local default
if ! action=$(yad --title="Select action" --height=200 --list --column="action" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too many magic numbers: height=200, width=450, height=500.

watchface=${watchface//|}
;;
esac
# convert | chars to spaces
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is apparently a cut-and-paste error and is misleading here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants